//
//  LSZPostedTableViewCell.m
//  JKFuYinProject
//
//  Created by 九酷 on 2017/9/15.
//  Copyright © 2017年 LC. All rights reserved.
//

#import "LSZPostedTableViewCell.h"

@implementation LSZPostedTableViewCell
-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
    //类别
    self.labelClass = [[UILabel alloc]init];
    self.labelClass.textColor = titleColorLSZ;
    self.labelClass.textAlignment =NSTextAlignmentCenter;
    [self addSubview:self.labelClass];

    UIView * viewShu = [[UIView alloc]init];
    viewShu.backgroundColor = divider;
    [self addSubview:viewShu];
    //label
    self.labelContent = [[UILabel alloc]init];
    self.labelContent.textColor = titleColorLSZ;
    self.labelContent.hidden = YES;
    self.labelContent.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.labelContent];
    //输入框
    self.textFieldName = [[UITextField alloc]init];
    self.textFieldName.textColor = titleColorLSZ;
    self.textFieldName.hidden = YES;
    self.textFieldName.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.textFieldName];

    self.textViewControl = [[UITextView alloc]init];
    self.textViewControl.hidden = YES;

    self.textViewControl.textColor = titleColorLSZ;
    [self addSubview:self.textViewControl];

    if (ScreenWidth == 320) {
        //5
        self.labelClass.font = FONT_(13.5);
        self.textFieldName.font = FONT_(13.5);
        self.labelContent.font = FONT_(13.5);
        self.labelClass.frame = CGRectMake(14,(45-16)/2, 75, 16);
        viewShu.frame = CGRectMake(CGRectGetMaxX(self.labelClass.frame)+1.5,(45-16)/2, 0.3, 16);
        self.labelContent.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5, (45-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textFieldName.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5,(45-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textViewControl.font = FONT_16;
        self.textViewControl.frame = CGRectMake( CGRectGetMaxX(viewShu.frame)+5, 10, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 80);
    }else if(ScreenWidth == 375){
        // 6 7
        self.labelClass.font = FONT_(14);
        self.textFieldName.font = FONT_(14);
        self.labelContent.font = FONT_(14);
        self.labelClass.frame = CGRectMake(14,(50-18)/2, 75, 18);
        viewShu.frame = CGRectMake(CGRectGetMaxX(self.labelClass.frame)+1.5,(50-16)/2, 0.3, 16);
        self.labelContent.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5, (50-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textFieldName.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5,(50-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textViewControl.font = FONT_16;
        self.textViewControl.frame = CGRectMake( CGRectGetMaxX(viewShu.frame)+5, 10, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 80);
    }else {
        //plus
        self.labelClass.font = FONT_(14.5);
        self.textFieldName.font = FONT_(14.5);
        self.labelContent.font = FONT_(14.5);
        self.labelClass.frame = CGRectMake(14,(58-20)/2, 75, 20);
        viewShu.frame = CGRectMake(CGRectGetMaxX(self.labelClass.frame)+1.5,(58-16)/2, 0.3, 16);
        self.labelContent.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5, (58-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textFieldName.frame = CGRectMake(CGRectGetMaxX(viewShu.frame)+5,(58-30)/2, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 30);
        self.textViewControl.font = FONT_16;
        self.textViewControl.frame = CGRectMake( CGRectGetMaxX(viewShu.frame)+5, 10, ScreenWidth-CGRectGetMaxX(viewShu.frame)-25, 80);
    }
    }
    return self;
}

@end
